package com.maserb.monitor.entity.schoolConduct;

import com.maserb.monitor.entity.BaseIdEntity;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 操行记录
 */
@Entity
@Table(name = "student_conduct_record")
public class StudentConductRecordEntity extends BaseIdEntity {

    /**
     * 评分项
     */
    public SchoolConductItemEntity item;

    /**
     * 学生
     */
    public SchoolStudentEntity student;

    /**
     * 创建时间
     */
    public Date createTime;

    /**
     * 创建用户
     */
    public String createUser;

    /**
     *  照片
     */
    public String image;

    /**
     * 说明
     */
    public String description;

    /**
     * 状态（0：未审核  1：审核通过  2：审核不通过）
     */
    public String status;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "item_id")
    public SchoolConductItemEntity getItem() {
        return item;
    }

    public void setItem(SchoolConductItemEntity item) {
        this.item = item;
    }


    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "student_id")
    public SchoolStudentEntity getStudent() {
        return student;
    }

    public void setStudent(SchoolStudentEntity student) {
        this.student = student;
    }

    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "create_user", length = 50)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Column(name = "image", length = 150)
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Column(name = "description", length = 1500)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "status", length = 150)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
